
//登录接口
export function login(params) {
  let { code, encryptedData, iv, settingCode} = wx.shareData;

    let postOptions = {
        urlPath: 'api/qlc/miniprogram/login',
        data: {
            jsCode:code,
            settingCode: settingCode,
            encryptedData: encryptedData,
            iv:iv
        }
    };
  return wx.shareInst.http.post(postOptions).then(function (data) {
    wx.shareData.loginInfo = data;
    return data;
  });
}




//接收小程序formid
export function getfromid(formIdList) {
    let { loginInfo } = wx.shareData;
    let uid = loginInfo.uid;
    let postOptions = {
        urlPath: 'api/message/getfromid',
        data: {
            uid: uid.toString(),
            formid: formIdList.join(",")
        }
    };
    return wx.shareInst.http.post(postOptions);
}